/* test_clone_pad.cc
* This file is part of ncursesxx library
* Copyright (c) 2003,2004 by Stanislav Ievlev
*
* This file is covered by the GNU Library General Public License,
* which should be included with libncursesxx as the file COPYING.
*/
#include <stdlib.h>
#include <string.h>
#include <curses.h>
#include <unistd.h>
#include <locale.h>


#include <string>

#include <ncurses/application.hh>
#include <ncurses/window.hh>
#include <ncurses/pad.hh>
#include <ncurses/pen.hh>

int
main()
{
	ncurses::application	app;
	ncurses::window	win;

	ncurses::pad	pad;

	win.resize(30, 10);
	pad.resize(200,200);
	
	ncurses::pad	pad2;
	pad2 = pad;
	
	ncurses::pen pen(pad),pen2(pad2);

	pen.frame();
	pen.move(1, 1);
	pen.write("write to main pad");

	pen2.move(1, 2);
	pen2.write("write to clone pad");

	pad.draw(win);

	::wrefresh(::stdscr); //made first screen refresh
	ncurses::pen(win).commit();
	::doupdate();

	::wgetch(::stdscr);
}
